import Vue from 'vue';
import Router from 'vue-router';
import yemao from '@/components/yemao/yemao';
import supers from '@/components/supers/supers';
import mine from '@/components/mine/mine';
import personal from '@/components/personal/personal';
import kdzq from '@/components/kdzq/kdzq';
import yemaoorder from '@/components/mine/yemaoorder/yemaoorder';
import duobaoorder from '@/components/mine/duobaoorder/duobaoorder';
import superorder from '@/components/mine/superorder/superorder';
import login from '@/components/login/login';
import goodsms from '@/components/goodsms/goodsms';
import cart from '../components/cart/cart';
import dialogue from '../components/dialogue/dialogue';
import Allordermsg from '../components/mine/superorder/Allordermsg/Allordermsg';


Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/yemao',
      name: 'yemao',
      component: yemao
    },
    {
      path: '/supers',
      name: 'supers',
      component: supers
    },
    {
      path: '/mine',
      name: 'mine',
      component: mine,
      children:[
      	{
      		path:'/mine/duobaoorder',
      		name:'duobaoorder',
      		component:duobaoorder
      	},
      	{
      		path:'/mine/superorder',
      		name:'superorder',
      		component:superorder,
      		children:[
      			  {
				    	path:'/mine/superorder/Allordermsg',
				    	name:'Allordermsg',
				    	component:Allordermsg
				    },
      		]
      	},
      	{
      		path:'/mine/yemaoorder',
      		name:'yemaoorder',
      		component:yemaoorder
      	}
      ]
    },
    {
      path: '/personal',
      name: 'personal',
      component: personal
    },
    {
    	path:'/kdzq',
    	name:'kdzq',
    	component:kdzq
    },
    {
    	path:'/login',
    	name:'login',
    	component:login
    },
    {
    	path:'/goodsms',
    	name:'goodsms',
    	component:goodsms
    },
    {
    	path:'/cart',
    	name:'cart',
    	component:cart
    },
    {
    	path:'/dialogue',
    	name:'dialogue',
    	component:dialogue
    },
    {
    	path:'*',redirect:'/yemao'
    }
  ]
})
